package com.cf.mvp.sample;

import android.os.Bundle;

import androidx.annotation.Nullable;

import com.cf.mvp.base.BaseView;
import com.cf.mvp.mvp.annotation.Presenter;
import com.cf.mvp.sample.mvp.contract.NoModelContract;
import com.cf.mvp.sample.mvp.presenter.NoModelPresenter;
import com.cf.mvp.tool.LogUtils;


@Presenter(NoModelPresenter.class)
public class Main2View extends BaseView<NoModelContract.Presenter> implements NoModelContract.View {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getPresenter().request();
    }

    @Override
    public void success() {
        LogUtils.d("操作无 Model", "成功");
    }

    public static void main(String[] args) {
        new Thread(() -> {
            Main2View view = new Main2View();
            view.onCreate(null);
//                view.onDestroy();
        }, "main").start();
    }


}
